<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/Site.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/zy.all.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/font-awesome.min.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/amazeui.min.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css" />
	</head>

	<body>
		<div class="dvcontent">
			<div>
				<!--tab start-->
				<div class="tabs">
					<div class="hd">
						<ul>
							<li class="on" style="box-sizing: initial;-webkit-box-sizing: initial;">预警管理</li>
							<li class="" style="box-sizing: initial;-webkit-box-sizing: initial;">添加预警</li>
						</ul>
					</div>
					<div class="bd">
						<ul style="display: block;padding: 20px;">
							<li>
								<!--分页显示角色信息 start-->
								<div id="dv1">
									<table class="table" id="tbRecord">
										<thead>
											<tr>
												<th>编号</th>
												<th>商品名称</th>
												<th>商品分类</th>
												<th>备注</th>
												<th>预警数量</th>
												<th>编辑</th>
												<th>删除</th>
											</tr>
										</thead>
										<tbody>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
											<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>4</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>4</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
												<tr>
												<td>1</td>
												<td>五花肉</td>
												<td>肉类</td>
												<td>备注</td>
												<td>200</td>
												<td class="edit"><button onclick="btn_edit(1)"><i class="icon-edit bigger-120"></i>编辑</button></td>
												<td class="delete"><button onclick="btn_delete(1)"><i class="icon-trash bigger-120"></i>删除</button></td>
											</tr>
										</tbody>

									</table>
								</div>
								<!--分页显示角色信息 end-->
							</li>
						</ul>
						<ul class="theme-popbod dform" style="display: none;">
							<div class="am-cf admin-main" style="padding-top: 0px;">
								<!-- content start -->

								<div class="am-cf admin-main" style="padding-top: 0px;">
									<!-- content start -->
									<div class="admin-content">
										<div class="admin-content-body">

											<div class="am-g">
												<div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">

												</div>
												<div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4" style="padding-top: 30px;">
													<form class="am-form am-form-horizontal" action="user/addUser1Submit.action" method="post">

														<div class="am-form-group">
															<label for="user-email" class="am-u-sm-3 am-form-label">
								分类</label>
															<div class="am-u-sm-9">
																<select name="groupId" required>
																	<option value="">请选择分类</option>

																</select> <small>分类</small>
															</div>
														</div>
														<div class="am-form-group">
															<label for="user-email" class="am-u-sm-3 am-form-label">
																商品名称</label>
																<div class="am-u-sm-9">
																	<select name="groupId" required>
																		<option value="">请选择商品</option>

																	</select> <small>商品</small>
																</div>
														</div>

														<div class="am-form-group">
															<label for="name" class="am-u-sm-3 am-form-label">
									数量</label>
															<div class="am-u-sm-9">
																<input type="text" id="name" required placeholder="预警数量" name="name">
																<small>预警数量</small>
															</div>
														</div>
														<div class="am-form-group">
															<label for="user-intro" class="am-u-sm-3 am-form-label">
									备注</label>
															<div class="am-u-sm-9">
																<textarea class="" rows="5" id="user-intro" name="remark" placeholder="输入备注"></textarea>
																<small>250字以内...</small>
															</div>
														</div>
														<div class="am-form-group">
															<div class="am-u-sm-9 am-u-sm-push-3">
																<input type="submit" class="am-btn am-btn-success" value="添加分类" />
															</div>
														</div>
													</form>
												</div>
											</div>
										</div>
										<footer class="admin-content-footer">
											<hr>
											<p class="am-padding-left"></p>
										</footer>
									</div>
									<!-- content end -->
								</div>
								<!--添加 end-->
						</ul>
						</div>
					</div>
					<!--tab end-->

				</div>

				<script src="${pageContext.request.contextPath}/js/jquery-1.7.2.min.js" type="text/javascript"></script>
				<script src="${pageContext.request.contextPath}/js/plugs/Jqueryplugs.js" type="text/javascript"></script>
				<script src="${pageContext.request.contextPath}/js/_layout.js"></script>
				<script src="${pageContext.request.contextPath}/js/plugs/jquery.SuperSlide.source.js"></script>
				<script>
					var num = 1;
					$(function() {

						$(".tabs").slide({ trigger: "click" });

					});

					var btn_save = function() {
						var pid = $("#RawMaterialsTypePageId  option:selected").val();
						var name = $("#RawMaterialsTypeName").val();
						var desc = $("#RawMaterialsTypeDescription").val();
						var ramark = $("#Ramark").val();
						$.ajax({
							type: "post",
							url: "/RawMaterialsType/AddRawMaterialsType",
							data: { name: name, pid: pid, desc: desc, ramark: ramark },
							success: function(data) {
								if(data > 0) {
									$.jq_Alert({
										message: "添加成功",
										btnOktext: "确认",
										dialogModal: true,
										btnOkClick: function() {
											//$("#RawMaterialsTypeName").val("");
											//$("#RawMaterialsTypeDescription").val("");
											//$("#Ramark").val("");                           
											//page1();
											location.reload();

										}
									});
								}
							}
						});
						alert(t);
					}

					var btn_edit = function(id) {
						$.jq_Panel({
							url: "/RawMaterialsType/EditRawMaterialsType?id=" + id,
							title: "编辑分类",
							dialogModal: true,
							iframeWidth: 500,
							iframeHeight: 400
						});
					}
					var btn_delete = function(id) {
						$.jq_Confirm({
							message: "您确定要删除吗?",
							btnOkClick: function() {
							
							}
						});
					}
				</script>

			</div>
	</body>

</html>